﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Users;

namespace WanPiJie.AccountSite
{
	public class RequiredLoginActionFilterAttribute : ActionFilterAttribute
	{
		public override void OnActionExecuting(ActionExecutingContext filterContext)
		{
			base.OnActionExecuting(filterContext);

			if (UserWeb.IsAnonymous())
			{
				UserWeb.RedirectToLoginPage();
			}
		}
	}
}